package com.tl.mybatis03.mapper;

import com.tl.mybatis03.model.Address;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 收货地址mapper
 */
public interface AddressMapper {
    @Select("select * from address where user_id = #{id}")
    List<Address> findUserId(Integer id);

    /***************************** 事务的回滚 ***********************************/
    int insertAddress(Address address);

    /***************************** 懒加载 ***********************************/
    Address lazyLoadTest(int id);
}
